﻿#include "FITKFESubSysAcoustic.h"
#include "FITK_Kernel/FITKCore/FITKDataRepo.h"
#include "FITK_Interface/FITKInterfaceModel/FITKAbstractElement.h"
#include "FITK_Component/FITKAcousticsPhysics/FITKAcousticsAbstractSpectra.h"
//#include "FITK_Component/FITKAcousticsPhysics/FITKSpectraDampingLossFactor.h"
#include "FITK_Component/FITKAcousticsPhysics/FITKSpectraAbsorptionCoefficient.h"
#include "FITK_Component/FITKAcousticsPhysics/FITKAcousticsAbsMaterial.h"

namespace Acoustics
{

    FITKFESubSysAcoustic::FITKFESubSysAcoustic()
    {
    }

    FITKFESubSysAcoustic::~FITKFESubSysAcoustic()
    {
    }

    FITKAbstractFESubSys::FESubSysType FITKFESubSysAcoustic::getFESubSysType()
    {
        //获取子系统类型
        return FITKAbstractFESubSys::FESubSysType::FEAcoustic;
    }

    bool FITKFESubSysAcoustic::isDampingLoss()
    {
        FITKSpectraAbsorptionCoefficient* spec = FITKDATAREPO->getTDataByID<FITKSpectraAbsorptionCoefficient>(_dampSpectraID);
        if (spec) return false;
        return true;
    }

    void FITKFESubSysAcoustic::setDampingSpectraID(int dampSpecID)
    {
        //设置阻尼谱ID
        _dampSpectraID = dampSpecID;
    }

    int FITKFESubSysAcoustic::getDampingSpectraID()
    {
        //获取阻尼谱ID
        return _dampSpectraID;
    }

    FITKAcousticsAbstractSpectra* FITKFESubSysAcoustic::getDampingSpectraObj()
    {
        //获取阻尼谱数据对象
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_dampSpectraID);
    }
}


